#include "clientStdafx.h"
#include "AvatarManager.h"
#include "avatar.h"

namespace Apo
{
	AvatarManager gAvatarManager;
AvatarManager::AvatarManager(void)
{
}

AvatarManager::~AvatarManager(void)
{
}

avatar * AvatarManager::createAvatar(const char *name)
{
	avatar * ia = new avatar;
	ia->setName(name);
	m_avatarMap.insert(name,ia);
	return ia;
}

void AvatarManager::deleteAvatar(const char *name)
{
	avatar * ia = * m_avatarMap.find(name);
	if (ia)
	{
		SAFE_DELETE(ia);
		m_avatarMap.erase(name);
	}
}
}